Translation of Conditional Compilation
نویسنده
چکیده
This paper describes how to translate the compiler directives for conditional compilation in automated source-to-source translation between high-level programming languages. The directives for conditional compilation of the source language are translated into the corresponding directives of the target language, and the source program text of each branch of conditional compilation is translated into the corresponding target program text. Such translation raises a problem in conventional parsing because the source text is not a continuous stream of tokens of a legal program but rather a sequence of fragments that must be combined in certain ways to obtain one of several possible alternative programs. As a solution to this problem, a parsing technique is introduced which is able to cope with such input if certain reasonable conditions are satissed.
منابع مشابه
Translation of Conditional Compilat Translation of Conditional Compilation Translation of Conditional Compilation
This paper describes how to translate the compiler directives for conditional compilation in automated source-to-source translation between high-level programming languages. The directives for conditional compilation of the source language are translated into the corresponding directives of the target language, and the source program text of each branch of conditional compilation is translated ...
متن کاملOpening Up The C/C++ Preprocessor Black Box
File inclusion, conditional compilation and macro processing has made the preprocessor a powerful tool for programmers. Preprocessor directives are extensively used in C/C++ programs and have various purposes. However, program code with lots of directives often causes problems in program understanding and maintenance. The main source of the problem is the difference between the code that the pr...
متن کاملMinimizing Parsing when Extracting Information from Code in the Presence of Conditional Compilation
Exploring and understanding a software system require parsing its source code to extract necessary information. This task is complicated by the use of conditional compilation, a means o ered by several programming languages for selective compilation of source code based on conditions. In this paper, we discuss the di culties in parsing code with conditional compilation. We argue that the e ecti...
متن کاملParsing Minimization when Extracting Information from Code in the Presence of Conditional Compilation
Exploring and understanding a software system requires extracting meaningful information from it. This in turn involves syntactical analysis of source code, an activity that can be complicated by the use of conditional compilation. In this paper, we discuss difficulties when parsing code with conditional compilation. We argue that the effective way to ensure the extraction of all meaningful inf...
متن کاملAppraisal Theory in Translation Studies: An Introduction and Review of Studies of Evaluation in Translation
Translation studies (TS), as a young (inter)discipline, has partly relied on metadiscussions, critical assessments of its literature, and compilation of bibliographies to deal with certain problems of its youth, such as polarity and fragmentation. While the current status of TS shows general maturity, there are still young areas of inquiry in the discipline that are faced with similar issues. T...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997